// 与老师操作相关的一些请求

import request from '@/utils/request'

/**
 * @fileoverview
 * 该文件包含与老师操作相关的一些请求函数
 * @module AccountOperations
 */

// 定义API的基础路径
const BASE_URL = '/teacher';

/**
 * 教师获取自己所授所有课程信息的请求
 * @param data
 * @returns {*}
 */
export function getTeacherCourseList(data) {
  return request({
    url: `${BASE_URL}/getTeacherCourseList`,
    method: 'post',
    data
  });
}

/**
 * 教师获取自己所授课程的评价的请求
 * @param data
 * @returns {*}
 */
export function getStudentCommentList(data) {
  return request({
    url: `${BASE_URL}/getStudentCommentList`,
    method: 'post',
    data
  });
}


export function getTeacherDetail(){
  return request({
    url: `${BASE_URL}/getTeacherDetail`,
    method: 'post'
  });
}

export function updateTeacherInfo(data){
  return request({
    url: `${BASE_URL}/updateTeacherInfo`,
    method: 'post',
    data
  });
}

export function endCourse(data){
  return request({
    url: `${BASE_URL}/endCourse`,
    method: 'post',
    data
  });
}

export function getCourseStudentList(data){
  return request({
    url: `${BASE_URL}/getCourseStudentList`,
    method: 'post',
    data
  });
}

export function removeStudentFromCourse(data){
  return request({
    url: `${BASE_URL}/removeStudentFromCourse`,
    method: 'post',
    data
  });
}

export function deleteCourseReview(data){
  return request({
    url: `${BASE_URL}/deleteCourseReview`,
    method: 'post',
    data
  });
}

export function teacherAddStudentToCourse(data){
  return request({
    url: `${BASE_URL}/teacherAddStudentToCourse`,
    method: 'post',
    data
  });

}
export function updateSelectCourse(data) {
  return request({
    url: `${BASE_URL}/updateSelectCourse`,
    method: 'post',
    data
  });
}

export function getEnrollmentCommentList(data){
  return request({
    url: `${BASE_URL}/getEnrollmentCommentList`,
    method: 'post',
    data
  });
}
